From 317cf71bc7d4674b48bc618903d3a375aa086e7a Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 20 May 2015 15:38:58 +0100 Subject: [PATCH] tools: Expose XSM Flask initial SIDs list to tools By generating tools/include/xen-xsm/flask/flask.h using the same tool as used during the hypervisor build. Note that this is done regardless of whether XSM is enabled, since we want the tools to be agnostic to whether or not XSM is enabled in the hypervisor Signed-off-by: Ian Campbell Acked-by: Wei Liu Acked-by: Daniel De Graaf --- .gitignore | 1 + tools/include/Makefile | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c6185a06d8..3bc9cd99d2 100644 --- a/.gitignore +++ b/.gitignore @@ -147,6 +147,7 @@ tools/hotplug/Linux/xen-hotplug-common.sh tools/hotplug/Linux/xendomains tools/hotplug/NetBSD/rc.d/xencommons tools/include/xen/* +tools/include/xen-xsm/* tools/include/xen-foreign/*.(c|h|size) tools/include/xen-foreign/checker tools/libxl/libxlu_cfg_y.output diff --git a/tools/include/Makefile b/tools/include/Makefile index 3cd157aae9..dec8b3d352 100644 --- a/tools/include/Makefile +++ b/tools/include/Makefile @@ -1,8 +1,11 @@ XEN_ROOT = $(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk +# Relative to $(XEN_ROOT)/xen/xsm/flask +FLASK_H_DEPEND := policy/initial_sids + .PHONY: all -all: xen-foreign xen/.dir +all: xen-foreign xen/.dir xen-xsm/.dir .PHONY: xen-foreign xen-foreign: @@ -19,6 +22,15 @@ xen/.dir: ln -s ../xen-foreign xen/foreign touch $@ +# Not xen/xsm as that clashes with link to +# $(XEN_ROOT)/xen/include/public/xsm above. +xen-xsm/.dir: $(XEN_ROOT)/xen/xsm/flask/policy/mkflask.sh \ + $(patsubst %,$(XEN_ROOT)/xen/xsm/flask/%,$(FLASK_H_DEPEND)) + mkdir -p xen-xsm/flask + cd $(XEN_ROOT)/xen/xsm/flask/ && \ + $(SHELL) policy/mkflask.sh $(AWK) $(CURDIR)/xen-xsm/flask $(FLASK_H_DEPEND) + touch $@ + .PHONY: install install: all $(INSTALL_DIR) $(DESTDIR)$(includedir)/xen/arch-x86 @@ -47,7 +59,7 @@ install: all .PHONY: clean clean: - rm -rf xen + rm -rf xen xen-xsm $(MAKE) -C xen-foreign clean -- 2.30.2